/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PerdidasProductos.java
 *
 * Created on 28/06/2011, 01:25:21 AM
 */

package GUI;
import Interfaz.InterfazControl;
import Motor.ClaseUtilitaria;
import Motor.Empleado;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
/**
 *
 * @author Davielis
 */
public class PerdidasProductos extends javax.swing.JFrame {

    /** Creates new form PerdidasProductos */
	private InterfazControl laInterfaz;
	private Empleado empleado1;
    public PerdidasProductos(InterfazControl laInterfaz, Empleado empleado) {
        initComponents();
		this.laInterfaz=laInterfaz;
      	this.setLocationRelativeTo(null); // Cambiar icono de java en ventana
		empleado1= empleado;
        this.setIconImage(new ImageIcon("src/imagenes/marketplus2.png").getImage());
		jTFecha.setText(ClaseUtilitaria.tenerFechaActual());
		
		
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel4 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jTFecha = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jTIdProducto = new javax.swing.JTextField();
        jTSalir = new javax.swing.JToggleButton();
        jLabel14 = new javax.swing.JLabel();
        jTNombreProducto = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        jTRubro = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jTCantidades = new javax.swing.JTextField();
        jTBuscar1 = new javax.swing.JToggleButton();
        jTRetornar = new javax.swing.JToggleButton();
        jLabel11 = new javax.swing.JLabel();
        jTEliminar1 = new javax.swing.JToggleButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setMinimumSize(new java.awt.Dimension(750, 500));
        setResizable(false);
        getContentPane().setLayout(null);

        jLabel4.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N
        jLabel4.setText("Registrar Pérdidas Productos");
        getContentPane().add(jLabel4);
        jLabel4.setBounds(210, 40, 380, 40);

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/marketplus.png"))); // NOI18N
        getContentPane().add(jLabel2);
        jLabel2.setBounds(10, 10, 100, 94);

        jLabel3.setText("Fecha:");
        getContentPane().add(jLabel3);
        jLabel3.setBounds(600, 110, 40, 14);

        jTFecha.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTFechaActionPerformed(evt);
            }
        });
        getContentPane().add(jTFecha);
        jTFecha.setBounds(640, 110, 70, 20);

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/pedidaProducto.jpg"))); // NOI18N
        getContentPane().add(jLabel1);
        jLabel1.setBounds(10, 130, 310, 240);

        jLabel5.setText("ID Producto:");
        getContentPane().add(jLabel5);
        jLabel5.setBounds(360, 150, 90, 30);

        jTIdProducto.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTIdProductoKeyTyped(evt);
            }
        });
        getContentPane().add(jTIdProducto);
        jTIdProducto.setBounds(480, 160, 120, 20);

        jTSalir.setFont(new java.awt.Font("Tahoma", 1, 11));
        jTSalir.setText("Salir del Sistema");
        jTSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTSalirActionPerformed(evt);
            }
        });
        getContentPane().add(jTSalir);
        jTSalir.setBounds(580, 340, 150, 23);

        jLabel14.setText("Nombre:");
        getContentPane().add(jLabel14);
        jLabel14.setBounds(360, 200, 140, 20);

        jTNombreProducto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTNombreProductoActionPerformed(evt);
            }
        });
        jTNombreProducto.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTNombreProductoKeyTyped(evt);
            }
        });
        getContentPane().add(jTNombreProducto);
        jTNombreProducto.setBounds(480, 200, 230, 20);

        jLabel16.setText("Rubro:");
        getContentPane().add(jLabel16);
        jLabel16.setBounds(360, 240, 140, 20);

        jTRubro.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTRubroKeyTyped(evt);
            }
        });
        getContentPane().add(jTRubro);
        jTRubro.setBounds(480, 240, 230, 20);

        jLabel6.setText("Cantidades Pérdidas:");
        getContentPane().add(jLabel6);
        jLabel6.setBounds(350, 280, 170, 20);

        jTCantidades.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTCantidadesKeyTyped(evt);
            }
        });
        getContentPane().add(jTCantidades);
        jTCantidades.setBounds(480, 280, 120, 20);

        jTBuscar1.setText("Buscar");
        getContentPane().add(jTBuscar1);
        jTBuscar1.setBounds(610, 160, 105, 23);

        jTRetornar.setText("Ir a Gerente");
        jTRetornar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTRetornarActionPerformed(evt);
            }
        });
        getContentPane().add(jTRetornar);
        jTRetornar.setBounds(470, 340, 105, 23);

        jLabel11.setFont(new java.awt.Font("Tahoma", 1, 10));
        jLabel11.setText("RIF: J-122231245          Desarrollado por: Group Delivery");
        getContentPane().add(jLabel11);
        jLabel11.setBounds(230, 390, 320, 20);

        jTEliminar1.setText("Eliminar");
        jTEliminar1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTEliminar1ActionPerformed(evt);
            }
        });
        getContentPane().add(jTEliminar1);
        jTEliminar1.setBounds(360, 340, 105, 23);

        pack();
    }// </editor-fold>//GEN-END:initComponents

	private void jTFechaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTFechaActionPerformed
		// TODO add your handling code here:
}//GEN-LAST:event_jTFechaActionPerformed

	private void jTNombreProductoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTNombreProductoKeyTyped
		// TODO add your handling code here:
		char c = evt.getKeyChar();
		if (Character.isDigit(c)== true)
		evt.consume();

	}//GEN-LAST:event_jTNombreProductoKeyTyped

	private void jTRetornarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTRetornarActionPerformed
		// TODO add your handling code here:
		Gerente iraGerente=new Gerente(laInterfaz,empleado1);
		iraGerente.setVisible(true);
		this.dispose();
}//GEN-LAST:event_jTRetornarActionPerformed

	private void jTEliminar1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTEliminar1ActionPerformed
		// TODO add your handling code here:
	}//GEN-LAST:event_jTEliminar1ActionPerformed

	private void jTSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTSalirActionPerformed
		// TODO add your handling code here:
		this.dispose();
	}//GEN-LAST:event_jTSalirActionPerformed

	private void jTIdProductoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTIdProductoKeyTyped
		// TODO add your handling code here
		char c = evt.getKeyChar();
        if (Character.isDigit(c)== false)
        evt.consume();
	}//GEN-LAST:event_jTIdProductoKeyTyped

	private void jTNombreProductoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTNombreProductoActionPerformed
		// TODO add your handling code here:
	}//GEN-LAST:event_jTNombreProductoActionPerformed

	private void jTRubroKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTRubroKeyTyped
		// TODO add your handling code here:
		char c = evt.getKeyChar();
        if (Character.isDigit(c)== false)
        evt.consume();
	}//GEN-LAST:event_jTRubroKeyTyped

	private void jTCantidadesKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTCantidadesKeyTyped
		// TODO add your handling code here:
		char c = evt.getKeyChar();
        if (Character.isDigit(c)== false)
        evt.consume();
	}//GEN-LAST:event_jTCantidadesKeyTyped

    /**
    * @param args the command line arguments
    */
    

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JToggleButton jTBuscar1;
    private javax.swing.JTextField jTCantidades;
    private javax.swing.JToggleButton jTEliminar1;
    private javax.swing.JTextField jTFecha;
    private javax.swing.JTextField jTIdProducto;
    private javax.swing.JTextField jTNombreProducto;
    private javax.swing.JToggleButton jTRetornar;
    private javax.swing.JTextField jTRubro;
    private javax.swing.JToggleButton jTSalir;
    // End of variables declaration//GEN-END:variables

}
